package com.resou.reader.api.entry;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

public class BookListBean {

    /**
     * bookListId : 书单ID1
     * bookListName : 书单名称1
     * bookListRecommend : 推荐理由3
     * viewCount : 1200
     * bookCount : 21
     * collectionCount : 200
     * bookListLabel : 种田,经商
     * uploadDate : 1552615453024
     * commentCount : 12
     * userCollection : 1
     * listBook : {"totalPage":1,"page":0,"pageNum":10,"books":[{"novelId":"小说ID1","novelName":"小说名称1","novelAuthor":"作者1","novelCover":"http://qidian.qpic.cn/qdbimg/349573/c_10001199403116303/180","series":1,"novelWords":123000,"novelSummary":"jianjie1","novelCategory":"分类1","novelRecommend":"推荐语1","novelLikeNum":12,"join":1,"userLike":0},{"novelId":"小说ID2","novelName":"小说名称2","novelAuthor":"作者2","novelCover":"http://qidian.qpic.cn/qdbimg/349573/c_10001199403116303/180","series":3,"novelWords":123000,"novelSummary":"jianjie1","novelCategory":"分类2","novelRecommend":"推荐语2","novelLikeNum":12,"join":1,"userLike":0}]}
     */

    private String bookListId;
    private String bookListName;
    private String bookListRecommend;
    private int viewCount;
    private int bookCount;
    private int collectionCount;
    private String bookListLabel;
    private long uploadDate;
    private int commentCount;
    private int userCollection;
    private ListBookBean listBook;

    public String getBookListId() {
        return bookListId;
    }

    public void setBookListId(String bookListId) {
        this.bookListId = bookListId;
    }

    public String getBookListName() {
        return bookListName;
    }

    public void setBookListName(String bookListName) {
        this.bookListName = bookListName;
    }

    public String getBookListRecommend() {
        return bookListRecommend;
    }

    public void setBookListRecommend(String bookListRecommend) {
        this.bookListRecommend = bookListRecommend;
    }

    public int getViewCount() {
        return viewCount;
    }

    public void setViewCount(int viewCount) {
        this.viewCount = viewCount;
    }

    public int getBookCount() {
        return bookCount;
    }

    public void setBookCount(int bookCount) {
        this.bookCount = bookCount;
    }

    public int getCollectionCount() {
        return collectionCount;
    }

    public void setCollectionCount(int collectionCount) {
        this.collectionCount = collectionCount;
    }

    public String getBookListLabel() {
        return bookListLabel;
    }

    public void setBookListLabel(String bookListLabel) {
        this.bookListLabel = bookListLabel;
    }

    public long getUploadDate() {
        return uploadDate;
    }

    public void setUploadDate(long uploadDate) {
        this.uploadDate = uploadDate;
    }

    public int getCommentCount() {
        return commentCount;
    }

    public void setCommentCount(int commentCount) {
        this.commentCount = commentCount;
    }

    public int getUserCollection() {
        return userCollection;
    }

    public void setUserCollection(int userCollection) {
        this.userCollection = userCollection;
    }

    public ListBookBean getListBook() {
        return listBook;
    }

    public void setListBook(ListBookBean listBook) {
        this.listBook = listBook;
    }

    public static class ListBookBean {
        /**
         * totalPage : 1
         * page : 0
         * pageNum : 10
         * books : [{"novelId":"小说ID1","novelName":"小说名称1","novelAuthor":"作者1","novelCover":"http://qidian.qpic.cn/qdbimg/349573/c_10001199403116303/180","series":1,"novelWords":123000,"novelSummary":"jianjie1","novelCategory":"分类1","novelRecommend":"推荐语1","novelLikeNum":12,"join":1,"userLike":0},{"novelId":"小说ID2","novelName":"小说名称2","novelAuthor":"作者2","novelCover":"http://qidian.qpic.cn/qdbimg/349573/c_10001199403116303/180","series":3,"novelWords":123000,"novelSummary":"jianjie1","novelCategory":"分类2","novelRecommend":"推荐语2","novelLikeNum":12,"join":1,"userLike":0}]
         */

        private int totalPage;
        private int page;
        private int pageNum;
        private List<BooksBean> books;

        public int getTotalPage() {
            return totalPage;
        }

        public void setTotalPage(int totalPage) {
            this.totalPage = totalPage;
        }

        public int getPage() {
            return page;
        }

        public void setPage(int page) {
            this.page = page;
        }

        public int getPageNum() {
            return pageNum;
        }

        public void setPageNum(int pageNum) {
            this.pageNum = pageNum;
        }

        public List<BooksBean> getBooks() {
            return books;
        }

        public void setBooks(List<BooksBean> books) {
            this.books = books;
        }

        public static class BooksBean implements Parcelable {
            /**
             * novelId : 小说ID1
             * novelName : 小说名称1
             * novelAuthor : 作者1
             * novelCover : http://qidian.qpic.cn/qdbimg/349573/c_10001199403116303/180
             * series : 1
             * novelWords : 123000
             * novelSummary : jianjie1
             * novelCategory : 分类1
             * novelRecommend : 推荐语1
             * novelLikeNum : 12
             * join : 1
             * userLike : 0
             */

            private String novelId;
            private String novelName;
            private String novelAuthor;
            private String novelCover;
            private int series;
            private int novelWords;
            private String novelSummary;
            private String novelCategory;
            private String novelRecommend;
            private int novelLikeNum;
            private int join;
            private int userLike;
            private boolean userLikestate;
            private boolean isShowAll = false;


            protected BooksBean(Parcel in) {
                novelId = in.readString();
                novelName = in.readString();
                novelAuthor = in.readString();
                novelCover = in.readString();
                series = in.readInt();
                novelWords = in.readInt();
                novelSummary = in.readString();
                novelCategory = in.readString();
                novelRecommend = in.readString();
                novelLikeNum = in.readInt();
                join = in.readInt();
                userLike = in.readInt();
                userLikestate = in.readByte() != 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                dest.writeString(novelId);
                dest.writeString(novelName);
                dest.writeString(novelAuthor);
                dest.writeString(novelCover);
                dest.writeInt(series);
                dest.writeInt(novelWords);
                dest.writeString(novelSummary);
                dest.writeString(novelCategory);
                dest.writeString(novelRecommend);
                dest.writeInt(novelLikeNum);
                dest.writeInt(join);
                dest.writeInt(userLike);
                dest.writeByte((byte) (userLikestate ? 1 : 0));
            }

            @Override
            public int describeContents() {
                return 0;
            }

            public static final Creator<BooksBean> CREATOR = new Creator<BooksBean>() {
                @Override
                public BooksBean createFromParcel(Parcel in) {
                    return new BooksBean(in);
                }

                @Override
                public BooksBean[] newArray(int size) {
                    return new BooksBean[size];
                }
            };

            public String getNovelId() {
                return novelId;
            }

            public void setNovelId(String novelId) {
                this.novelId = novelId;
            }

            public String getNovelName() {
                return novelName;
            }

            public void setNovelName(String novelName) {
                this.novelName = novelName;
            }

            public String getNovelAuthor() {
                return novelAuthor;
            }

            public void setNovelAuthor(String novelAuthor) {
                this.novelAuthor = novelAuthor;
            }

            public String getNovelCover() {
                return novelCover;
            }

            public void setNovelCover(String novelCover) {
                this.novelCover = novelCover;
            }

            public int getSeries() {
                return series;
            }

            public void setSeries(int series) {
                this.series = series;
            }

            public int getNovelWords() {
                return novelWords;
            }

            public void setNovelWords(int novelWords) {
                this.novelWords = novelWords;
            }

            public String getNovelSummary() {
                return novelSummary;
            }

            public void setNovelSummary(String novelSummary) {
                this.novelSummary = novelSummary;
            }

            public String getNovelCategory() {
                return novelCategory;
            }

            public void setNovelCategory(String novelCategory) {
                this.novelCategory = novelCategory;
            }

            public String getNovelRecommend() {
                return novelRecommend;
            }

            public void setNovelRecommend(String novelRecommend) {
                this.novelRecommend = novelRecommend;
            }

            public int getNovelLikeNum() {
                return novelLikeNum;
            }

            public void setNovelLikeNum(int novelLikeNum) {
                this.novelLikeNum = novelLikeNum;
            }

            public int getJoin() {
                return join;
            }

            public void setJoin(int join) {
                this.join = join;
            }

            public int getUserLike() {
                return userLike;
            }

            public void setUserLike(int userLike) {
                this.userLike = userLike;
            }

            public boolean isUserLikestate() {
                return userLike == 1 ? true : false;
            }

            public void setUserLikestate(boolean userLikestate) {
                this.userLikestate = userLikestate;
            }

            public boolean isShowAll() {
                return isShowAll;
            }

            public void setShowAll(boolean showAll) {
                isShowAll = showAll;
            }
        }
    }
}
